<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="Cache-Control" content="no-cache" />
  <meta http-equiv="Pragma" content="no-cache" />
  <meta http-equiv="Expires" content="0" />
  <title>flask 文件共享</title>
  <link rel="stylesheet" href="../static/css/index.min.css?t={{randomArg}}">
  <script src="../static/js/index.min.js?t={{randomArg}}"></script>
</head>

<body>
  <div class="all-container">
    <h1>flask 文件共享</h1>
    <div class="drivers-container">
      根目录：
      {% for driver in data.drivers %}
      <a href="javascript:;" location="{{driver}}" style="color:#66ccff">{{driver}}</a>
      {% endfor %}
      <h3 class="currentPath">当前路径：<span>{{data.currentPath}}</span></h3>
    </div>
    <button class="to-lastPath" onclick="window.history.back()">&nbsp;←&nbsp;&nbsp;上级目录</button>
    <table class="files-table">
      <tr>
        <!-- 表头 -->
        <td class="td-name">文件或文件夹</td>
        <td class="td-size">大小</td>
        <td class="td-ctime">创建日期</td>
      </tr>
      <!-- 将传上来的files进行遍历 输出HTML标签 -->
      {% for file in data.files %}
      <tr type="{{file.type}}">
        <td class="td-name {{file.type}}"><a href="/download_file/{{file.name}}"
            dirname="{{file.name}}">{{file.name}}</a></td>
        <td class="td-size">{{file.size}}</td>
        <td class="td-ctime">{{file.ctime}}</td>
      </tr>
      {% endfor %}
    </table>
    <form action="/" method="POST" style="display: none;" id="pathForm">
      <input type="text" name="pathText" value>
      <input type="submit">
    </form>
    <section class="float-tablet">
      <button>
        <h4><a href="/upload_file">上 传 文 件</a></h4>
      </button>
      <button>
        <h4><a href="/logout">注&nbsp;&nbsp;&nbsp;&nbsp;销</a></h4>
      </button>
    </section>
    <section class="flash-tablet" style="display: none;">
      <div class="inner-container">
        <div class="drivers-container">
          根目录：
          {% for driver in data.drivers %}
          <a href="javascript:;" location="{{driver}}" style="color:black">{{driver}}</a>
          {% endfor %}
          <h3 class="currentPath">当前路径：<span>{{data.currentPath}}</span></h3>
        </div>
        <button class="to-lastPath" onclick="window.history.back()">&nbsp;←&nbsp;&nbsp;上级目录</button>
        <button id="to-top">返回顶部</button>
      </div>
    </section>
  </div>
</body>

</html>